package OneDay;

import java.sql.PreparedStatement;

public class Practice {
    public static void main(String[] args) {
        double x=8.452876;
        double y= (double)  (int)(8.457876*100+0.5)/100;
        System.out.println("y = " + y);
        System.out.println("----------------");
        double z=3.1415926;
        double a=(int)z;
        double b=z-(int)z;
        System.out.println("a = " + a);
        System.out.println("b = " + b);
        System.out.println("----------------");
        int c=789;
        int d=c/100;
        int e=(c/10)%10;
        int f=c%10;
        int g=d+e+f;
        System.out.println("d = " + d);
        System.out.println("e = " + e);
        System.out.println("f = " + f);
        System.out.println("g = " + g);
    }
}
